package com.kelaite.procurement.repository;

import java.util.Date;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import com.kelaite.procurement.entity.TSalesOrderItems;

public interface SalesOrderItemsRepository extends JpaRepository<TSalesOrderItems, Long>{
	
	@Modifying
	@Query(value = "update t_sales_order_items o set o.quantityDelivered =:quantityDelivered, o.actualTime =:actualTime, o.gmtUpdateTime =:gmtUpdateTime, o.updatedBy =:updatedBy where o.id =:id")
	public int updateSalesOrderItems(@Param("id") Long id,
			@Param("quantityDelivered") Double quantityDelivered,
			@Param("actualTime") Date actualTime,
			@Param("gmtUpdateTime") Date gmtUpdateTime,
			@Param("updatedBy") String updatedBy);
	
}
